package springboot01.demo.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import springboot01.demo.config.Person;

@Controller
public class TestController02 {
    @Autowired
    private Person person;
    @RequestMapping(value="/getPerson")
    public @ResponseBody String getPerson(){
        return person.getName()+" "+person.getAge();
    }
}
